Application Load Balancer (ALB)
💡 Definition
An Application Load Balancer (ALB) is a type of Elastic Load Balancer that functions at the application layer (Layer 7 of the OSI model). It is best suited for load balancing HTTP and HTTPS traffic for modern application architectures, including microservices and containers.
🔑 Key Concepts
- Layer 7: Can inspect content of the request (headers, cookies, URL path) to make routing decisions.
- Path-Based Routing: Can route
/imagesto one target group and/apito another. - Host-Based Routing: Can route
site-a.comto one group andsite-b.comto another. - Target Types: Can route to EC2 instances, Lambda functions, and IP addresses.
⚙️ How it Works
- Listeners: You configure listeners (e.g., Port 80) to check for connection requests.
- Rules: You define rules (e.g., "If URL path contains
/api"). - Routing: Traffic matching a rule is forwarded to a specific Target Group.
🎯 Use Cases
- Microservices: Routing traffic to different services based on the URL path.
- Containerized Apps: Deep integration with ECS and EKS.
- Web Applications: Handling HTTP/HTTPS traffic with advanced routing needs.
💰 Pricing Model
- Charged per Application Load Balancer-hour and per LCU (Load Balancer Capacity Unit) used.
📝 Exam Tips (CLF-C02)
- Think "Layer 7" (Application Layer).
- Think "HTTP/HTTPS".
- Supports Path-based and Host-based routing.
- Routes traffic to Target Groups.
See Also: * Load Balancer * Target Group * Auto Scaling